<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j">

<h:panelGroup rendered="#{loginController.usuarioSession != null}">
	<h:form>
		<h:outputLabel value="#{loginController.usuarioSession.email}" />
		<h:commandLink value="Sair" action="#{loginController.sair}" />
	</h:form>
</h:panelGroup>

<h:panelGroup rendered="#{loginController.usuarioSession == null}">
	<h:form>
		<h:panelGrid columns="3">
			<h:outputLabel value="Email" for="email" />
			<h:inputText id="email" value="#{loginController.usuario.email}" required="true" />
			<h:message for="email" />

			<h:outputLabel value="Senha" for="senha" />
			<h:inputText id="senha" value="#{loginController.usuario.senha}" required="true" />
			<h:message for="senha" />
		</h:panelGrid>
		<h:commandButton value="Acessar" action="#{loginController.acessar}" />
	</h:form>
</h:panelGroup>

</html>